package com.mark.maven.dao;

import com.mark.maven.domain.Address;
import com.mark.maven.domain.Contact;
import com.mark.maven.domain.Customer;
import com.mark.maven.domain.Order;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class QueryOrderDao {
    public Order queryByNo(String orderNo) {
        return Order.builder()
                .orderNo("1843984398439")
                .orderStatus("INIT")
                .createTime(new Date())
                .customer(Customer.builder().customerNo("VIP0001").build())
                .sender(Contact.builder().name("张三").mobilePhone("13800000000").address(Address.builder().provinceName("广东省").cityName("深圳市").districtName("南山区").townName("南山街道").detailAddress("南山大道").build()).build())
                .receiver(Contact.builder().name("张三").mobilePhone("13800000000").address(Address.builder().provinceName("广东2省").cityName("深圳2市").districtName("南山2区").townName("南山2街道").detailAddress("南山2大道").build()).build())
                .build();
    }
}
